package com.koocloud.electroplatemanage.mapper;

import com.koocloud.electroplatemanage.pojo.Process;
import com.koocloud.electroplatemanage.pojo.ProcessParameter;
import com.koocloud.electroplatemanage.pojo.WorkProcessVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @program: Information_platform
 * @description: 主要工道及其过程记录Mapper层
 * @author: xxc
 * @create: 2020-11-16 14:39
 */
@Mapper
public interface WorkProcessMapper {

    //根据工单号查询数据
    WorkProcessVo selectByWorkOrderNumber(String workOrderNumber);

    //对主要工道及其过程记录进行全表查询
    List<WorkProcessVo> selectAllData(WorkProcessVo workProcessVo);

    //根据工单号查询主要工道及其过程记录
    List<ProcessParameter> selectByWorkOrderNumberResult(String workOrderNumber);

    //新增一条数据
    int insert(WorkProcessVo workProcessVo);

    //新增工序到历史工序表
    int insertWorkProcessResult(ProcessParameter processParameter);

    //逻辑删除一条数据
    int delete(@Param("id")String id, @Param("userId")String userId, @Param("deleteFlag") String deleteFlag);

    //进入下一步的状态
    int changeState(String workOrderNumber);

    //完成进入下一步的状态
    int changeState2(String workOrderNumber);
    //根据工单号修改一条数据
    int update(WorkProcessVo workProcessVo);

    //查询工单号记录数
    int selectWorkOrderNumberCount(String workOrderNumber);


    //查询工道表体记录数
    int selectResultWorkNumberCount(String workOrderNumber);
}
